﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace PersianCore
{
    public abstract class BaseWeather : Node
    {
        protected bool loadingDone;
        protected GraphicsDevice GDevice;
        protected Matrix WorldMatrix = Matrix.Identity;
        protected Effect effect;

        protected EffectParameter WorldParam, ProjectionParam, ViewParam, TimeParam, HeightParam,
            WidthParam, LengthParam, ColorParam, VelocityParam, OriginParam;

        protected Color color;
        protected Vector3 Velocity;
        protected float? Turbulence;
        protected Texture2D texture;
        protected VertexBuffer vBuffer;

        public abstract void Load(ContentManager Content);
        public abstract void Update(float gameTime);
        public abstract void Draw();

        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                this.GDevice.Dispose();
                this.effect.Dispose();
                this.texture.Dispose();
                this.vBuffer.Dispose();
            }
            base.Dispose(disposing);
        }
    }
}
